<?php
/*
 * File "public-head.php"
 *
 * Created on 09/mag/09
 * @author gabrielepiva
 * @email www.gabri@gmail.com
 *
 * @projectName sandrodelpistoia.com
 * @workgroup Nerd Riot
 *
 * \brief Inserire descrizione del file
 *
 *
 */
include_once("config.php");
?>
<head>
	<meta http-equiv="Content-Language" content="en" />
	<meta name="GENERATOR" content="PHPEclipse 1.0" />
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<title>Sandro del Pistoia</title>

	<link rel="stylesheet" type="text/css" href="public.css" />


	<script src="lib/jquery-1.3.2.js" type="text/javascript"></script>
	<script src="lib/jquery-ui-1.7.1.custom.min.js" type="text/javascript"></script>
	<script src="lib/JSON.js" type="text/javascript" ></script>
	<script src="lib/jquery.history.js" type="text/javascript"></script>
	<script src="public-functions.js" type="text/javascript"></script>

	<script type="text/javascript">
		function pageLoad(hash){
			$("#load").html("")
			$("a[href=#"+hash+"]").attr({
				"class": "active"
			})
			if(hash.match("photos")){
				galleries_index()
				$("ul#subMenu").fadeIn()
				if(hash.match("/[0-9]")){
					gallery_active = hash.split("/")[1]
					thumbs()
				}
			}

			$("#gn-works a").attr({"class":"active"})

			if(hash == "videos" || hash == "biography" || hash == "events" || hash == "contacts"){
				$("#photo_title").fadeOut()
				$("#photo_description").fadeOut()
				$("#thumbs").html("")
				if($("#subMenu").css("display") != "none"){
					$("#subMenu").fadeOut()
					$("#thumbs").fadeOut()
				}
			}
			if(hash == "videos"){
				$("#load").html('<object width="800" height="500"><param name="movie" value="http://www.youtube.com/p/21F9DE3DA4C1EF77&amp;hl=it&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/p/21F9DE3DA4C1EF77&amp;hl=it&amp;fs=1" type="application/x-shockwave-flash" width="800" height="500" allowscriptaccess="always" allowfullscreen="true"></embed></object>')
				return
			}
			if(hash == "events"){
				viewEvents()
			}
			if(hash == "biography" || hash == "contacts"){
				$("#load").load("pages/public.php?page="+hash);
			}
		}
		$(document).ready(function(){
			window.location.replace("#photos")
			$.historyInit(pageLoad);
			$("a[href="+window.location.hash+"]").attr({
				"class": "active"
			})
			$("a.menu").click(function(event){
				event.preventDefault()
				$(".active").removeAttr("class")
				$(this).attr({
					"class" : "active"
				})
				var hash = this.href;
				window.location.replace(hash)
				hash = hash.replace(/^.*#/, '');
				$.historyLoad(hash)
				return false
			})
		})
	</script>

</head>
